FROM node:18
RUN mkdir -p /app
WORKDIR /app
COPY . /app
# 安装依赖
RUN npm config set registry https://registry.npmmirror.com/
RUN npm install
RUN npm run build
# 暴露端口
EXPOSE 3000
# CMD ["npm","run","build"]